const router = require('koa-router')()
const {
    authUser
} = require('../controller/auth')

router.prefix('/api')

/**
 * @description 入驻认证
 */
router.post('/auth', async (ctx, next) => {
    const {
        cover,
        nickName,
        describe,
        city,
        province,
        types,
        weChat,
        phone,
        imgsData,
        openId
    } = ctx.request.body

    ctx.body = await authUser( {
        cover,
        nickName,
        describe,
        city,
        province,
        types,
        weChat,
        phone,
        imgsData,
        openId,
        auth:2
    })
})



module.exports = router
